﻿using Lamex.Common;
using Lamex.Interface;
using Lamex.Library;
using Lamex.Library.CommonClass;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Lamex.SystemManager.UI
{
    public partial class frmMainSystem : frmModuleBase
    {
        public frmMainSystem()
        {
            InitializeComponent();
            //_ModuleID = ModuleID.SystemManage; //设置模块编号
            //_ModuleName = ModuleNames.SystemManage;//设置模块名称
            menuStrip1.Text = ModuleNames.SystemManage; //与AssemblyModuleEntry.ModuleName定义相同

            this.MainMenuStrip = this.menuStrip1;
        }
        public override MenuStrip GetModuleMenu()
        {
            return this.menuStrip1;
        }
        private void menuItemUserMgr_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmUser), sender as ToolStripMenuItem);
        }

        private void toolMenuCompany_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(Company), sender as ToolStripMenuItem);
        }

        private void menuStripOrgaStruct_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmOrgaStruct), sender as ToolStripMenuItem);
        }

        private void ToolStripMenuFunction_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmFunction), sender as ToolStripMenuItem);
        }

        private void ToolStripMenuRoleItem_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmRole), sender as ToolStripMenuItem);
        }

        private void menuStripMenu_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmMenu), sender as ToolStripMenuItem);
            //MessageBox.Show("1234");
        }

        private void menuSys_DataManagement_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("Sys_DataAuthority", 0, true, true), sender as ToolStripMenuItem);
        }

        private void toolStripItemButtonList_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmButtonList), sender as ToolStripMenuItem);
        }

        private void menuSys_FormConfig_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("Sys_FormControl", 0, true, true), sender as ToolStripMenuItem);
        }

        private void menuSys_OptionSetting_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("Sys_ControlValueOption", 0, true, true), sender as ToolStripMenuItem);
        }
        
    }
}
